<template>
	<view class="goods">
		<view class="goods-item" v-for="item in goods" :key="item.id">
			<navigator :url="'/pages/goods/detail?id='+item.id">
				<u--image :src="item.cover_url" width="330rpx" height="330rpx"></u--image>
				<view class="info">
					<text class="price">￥ {{item.price}}</text>
					<text class="sale">销量：{{item.sales}}</text>
				</view>
				<view class="title u-line-2">{{item.title}}</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		name:"goods-item",
		props: ['goods'],
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
	.goods {
		display: flex;
		flex-wrap: wrap;
		.goods-item {
			width: 350rpx;
			padding: 10rpx;
			box-shadow: 0 10rpx 20rpx rgba(0,0,0,.1);
			margin: 10rpx;
			box-sizing: border-box;
			.info {
				display: flex;
				justify-content: space-between;
				margin: 10rpx 0;
				.price {
					color: red;
				}
				.sale {
					color: #888
				}
			}
			.title {
				font-weight: 700;
				font-size: 30rpx;
			}
		}
	}
</style>
